package com.ddxz.hetong.dto;

import com.ddxz.tool.core.convert.StringUtil;
import lombok.Data;

import java.io.Serializable;
import java.util.Arrays;
import java.util.List;

/**
 * description
 *
 * @author 朱宗刚
 * @version 1.0.0
 * @date 2022/7/9
 */

@Data
public class ProjectDto implements Serializable {
    private static final long serialVersionUID = -20220709121801L;

    private String deptName;

    private String protoName;

    private List<String> protoList;

    private Double total;

    private String itemName;

    private List<String> itemList;

    private String payDate;

    private Integer year;

    private String month;

    private Double payNum;

    private String billDate;

    private Double billNum;

    private Integer cunt;

    private Double percent;

    private Double remainder;

    private Double remainBill;

    public List<String> getItemList() {
        if(StringUtil.isBlank(itemName)) {
            return null;
        }
        return Arrays.asList(itemName.split(","));
    }

    public List<String> getProtoList() {
        if(StringUtil.isBlank(protoName)) {
            return null;
        }

        return Arrays.asList(protoName.split(","));
    }
}
